<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title th:text="${title}">智慧遥控助手认证</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" th:href="@{/plug-in/adminLTE/bootstrap/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/plug-in/adminLTE/dist/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/plug-in/adminLTE/dist/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/plug-in/adminLTE/dist/css/AdminLTE.min.css}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script th:src="@{/plug-in/adminLTE/plugins/ie9/html5shiv.min.js}"></script>
        <script th:src="@{/plug-in/adminLTE/plugins/ie9/respond.min.js}"></script>
    <![endif]-->

    <style>
        html,body{
            overflow: hidden;
        }
    </style>
</head>
<body class="hold-transition login-page">
    <div class="login-box">
        <div class="login-logo">
            <a href="#"><b>智慧</b>遥控助手</a>
        </div>
        <!-- /.login-logo -->
        <div class="login-box-body">
            <p class="login-box-msg">认证</p>
            <form  id="LocalLoginForm" th:action="@{/login/execLogin}" method="post" autocomplete="off"
                   onsubmit="onsubmitLoginForm();">
                <p th:utext="${errorInfo}" th:if="${errorInfo}!=null" class="bg-danger">有错误，请重试</p>

                <div class="form-group has-feedback">
                    <input type="text" id="code" name="code" class="form-control" maxlength="6" placeholder="输入控制台的6位数字验证码" />
                    <span class="glyphicon glyphicon-fire form-control-feedback"></span>
                </div>
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="rememberMe" >记住登录（7天）
                    </label>
                </div>
                <div class="row">
                    <!-- /.col -->
                    <div class="col-xs-4">
                        <button type="submit" class="btn btn-primary btn-block btn-flat">提交</button>
                    </div>
                    <!-- /.col -->
                </div>
            </form>

        </div>
        <!-- /.login-box-body -->
    </div>
    <!-- /.login-box -->

    <!-- jQuery 2.2.3 -->
    <script th:src="@{/plug-in/adminLTE/plugins/jQuery/jquery-3.6.0.min.js}"></script>
    <script th:src="@{/plug-in/adminLTE/plugins/jQuery/jquery-migrate-3.3.2.min.js}"></script>
    <!-- Bootstrap 3.3.6 -->
    <script th:src="@{/plug-in/adminLTE/bootstrap/js/bootstrap.min.js}"></script>


    <script type="text/javascript">
        $(function () {
            if (top.location != self.location) {  //有父窗口，显示
                window.parent.logout();
            }
        });

        //提交
        function onsubmitLoginForm(){

        }

        //键盘监听，回车键登录
        $(document).keydown(function (event) {
            if (event.keyCode == 13) {
                jsSumbitForm('LocalLoginForm'); return false;
            }
        });
        //禁用选择有右键菜单
        jQuery(document).ready(function(){
            jQuery(document).bind("contextmenu",function(e){return false;});//禁止右键菜单
        });

        function jsSumbitForm(object){
            window.document.forms[object].submit();
        }

    </script>

</body>
</html>
